// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023.
 * Description: integrity enabled.
 * Author: zhangguangzhi
 * Create: 2023-11-6
 */

#include <linux/kstrtox.h>
#include <linux/init.h>
#include "integrity_enabled.h"

int integrity_enabled;
static int __init integrity_setup(char *str)
{
	unsigned long status;

	if (!kstrtoul(str, 0, &status))
		integrity_enabled = status ? 1 : 0;
	return 1;
}
__setup("integrity=", integrity_setup);

bool is_integrity_enabled(void)
{
	return !!integrity_enabled;
}
